hvm/svm: Enable CR events
authorAlexandru Isaila <aisaila@bitdefender.com>
Thu, 15 Feb 2018 10:22:26 +0000 (12:22 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 15 Feb 2018 14:01:24 +0000 (14:01 +0000)
commit5e6984c50bc7147398474fea0e6b8dc7364b91b5
tree3e2f070b8ad2a3c6964713fed8b70fd6e6b76631
parent6e9fc4d628b613291e3bb5e2458b49ebc7cbd3af
hvm/svm: Enable CR events

The CR_INTERCEPT_CR3_WRITE intercept is out of the vmcb->_cr_intercepts
so the AMD arch can't intercept CR events.

This patch implements the CR intercept by adding the flag on a
write_ctrlreg event. The monitor write ctrlreg event is moved from the
Intel side to the common capabilities side.

We just need to enable the SVM intercept and then hvm_mov_to_cr() will
forward the event on to the monitor when appropriate.

Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/monitor.h